<script type="text/javascript" src="<?php echo base_url(); ?>MultiDatesPicker/js/jquery-1.7.2.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>MultiDatesPicker/js/jquery.ui.core.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>MultiDatesPicker/js/jquery.ui.datepicker.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>MultiDatesPicker/jquery-ui.multidatespicker.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>MultiDatesPicker/css/mdp.css">
<script src="<?php echo base_url(); ?>chosen/chosen.jquery.js" type="text/javascript"></script>

<form class="form-horizontal well">
    <fieldset>
        <legend>Registrar Ciclo Académico</legend>
        <div id="mensajeControl" style="display: none">
            <button type="button" class="close" data-dismiss="alert">×</button>
        </div>
        <div id="completarCampos" style="display:none"> 
            <h5>Complete los campos en rojo</h5>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="control-group">
                    <label class="control-label">Ciclo</label>
                    <div class="controls">
                        <select data-placeholder="Seleccionar..." id="ciclos" class="chosen-select">
                            <option value=""></option>
                            <?php foreach ($ciclos as $ciclo) { ?>
                                <option value=<?php echo $ciclo['idCiclo']; ?> > <?php echo $ciclo['descripcion']; ?> </option>
                            <?php } ?>
                        </select>
                    </div>
                </div>
            </div>
        </div>

        <div class="row-fluid">
            <div id="tabla_ver_ciclo_academico">
                <!--<div  style='overflow:scroll; height:400px'>-->
                <div>
                    <table class='table'>
                        <thead>
                            <tr>
                                <th>N° Semana</th> <th>Fecha Inicio</th> <th>Fecha Fin</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana1" class="input-mini" type="text" value="1" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni1" class="input-medium" type="date" onblur="completar_fechas();"></td>
                                <td align='center' valign='middle'><input id="fechaFin1" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana2" class="input-mini" type="text" value="2" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni2" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin2" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana3" class="input-mini" type="text" value="3" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni3" class="input-medium" type="date"  disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin3" class="input-medium" type="date"  disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana4" class="input-mini" type="text" value="4" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni4" class="input-medium" type="date"  disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin4" class="input-medium" type="date"  disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana5" class="input-mini" type="text" value="5" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni5" class="input-medium" type="date"  disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin5" class="input-medium" type="date"  disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana6" class="input-mini" type="text" value="6" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni6" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin6" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana7" class="input-mini" type="text" value="7" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni7" class="input-medium" type="date"  disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin7" class="input-medium" type="date"  disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana8" class="input-mini" type="text" value="8" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni8" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin8" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana9" class="input-mini" type="text" value="9" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni9" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin9" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana10" class="input-mini" type="text" value="10" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni10" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin10" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana11" class="input-mini" type="text" value="11" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni11" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin11" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana12" class="input-mini" type="text" value="12" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni12" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin12" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana13" class="input-mini" type="text" value="13" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni13" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin13" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana14" class="input-mini" type="text" value="14" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni14" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin14" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana15" class="input-mini" type="text" value="15" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni15" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin15" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana16" class="input-mini" type="text" value="16" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni16" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin16" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana17" class="input-mini" type="text" value="17" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni17" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin17" class="input-medium" type="date" disabled></td>
                            </tr>
                            <tr class='tr_hover_nothing' onmouseover="this.className = 'tr_hover_color';"
                                onmouseout="this.className = 'tr_hover_nothing';">
                                <td align='center' valign='middle'><input id="semana18" class="input-mini" type="text" value="18" disabled></td>
                                <td align='center' valign='middle'><input id="fechaIni18" class="input-medium" type="date" disabled></td>
                                <td align='center' valign='middle'><input id="fechaFin18" class="input-medium" type="date" disabled></td>
                            </tr>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>

        <!--        <div class="row-fluid">-->
        <!--            <div class="control-group">
                    <label class="control-label">Eventos en el ciclo:</label>
                    </div>
                  <div class="span3">
                     
                            <div class="control-group">
                                <label class="control-label">Tipo Evento</label>
                                <div class="controls"> <select class="selectpicker" data-style="btn-info">
                                        <option>Feriado</option>
                                        <option>Examen</option>
        
                                </select></div>
                             
                            
                        </div>
                        <div class="control-group">
                            <label class="control-label">Fecha</label>
                            <div class="controls"><input type="date"  id="fechaEvento"  ></div>
                        </div>
                    </div>-->


        <script type="text/javascript">
                                $(document).ready(function() {
                                    var date = new Date();
                                    $("#fechaMultiple").multiDatesPicker({
                                        
                                        dateFormat: "yy-mm-dd"
                                        
                                        
                                    });

                                    $("#fechaExamenes").multiDatesPicker({
                                        dateFormat: "yy-mm-dd"
                                    });

                                });

        </script>
    
            <a class="btn btn-info" onclick="$('input[id=fechaMultiple]').focus();">Agregar Feriados</a>
            <input type="text" id="fechaMultiple" style="display:none;  "/>
         
            <a class="btn btn-info" onclick="$('input[id=fechaExamenes]').focus();">Agregar Exámenes</a>
            <input type="text" id="fechaExamenes" style="display:none;  "/>
   
        <div class="row-fluid">
            <div class="form-actions">
                <a class="btn btn-primary" onclick="registrar_semanas_ciclo_academico();" >Registrar</a>
                <a class="btn btn-primary" onclick="atras_ciclo_academico();" >Atrás</a>
            </div>
        </div>


    </fieldset>
</form>

<script type="text/javascript">
    $(document).ready(function() {
        $(".chosen-select").chosen({no_results_text: "No hay coincidencias con"});
        $(".chosen-select-deselect").chosen({allow_single_deselect: true});
    });
</script>